package study.spring.condition.animal;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AnimalCfg {

    @Bean
    @ConditionOnAnimal(kind = "dog")
    public Animal dog() {
        return new Dog();
    }

    @Bean
    @ConditionOnAnimal(kind = "cat")
    public Animal cat() {
        return new Cat();
    }
}
